Skip to content

Conversation

@gurgunday
Copy link
Member

branch:

node % ./node benchmark/run.js --filter whatwg-url-to-and-from-path url
url/whatwg-url-to-and-from-path.js
url/whatwg-url-to-and-from-path.js n=5000000 input="file:///dev/null" method="fileURLToPath": 3,853,044.868707496
url/whatwg-url-to-and-from-path.js n=5000000 input="file:///dev/null?key=param&bool" method="fileURLToPath": 3,490,012.0935340663
url/whatwg-url-to-and-from-path.js n=5000000 input="file:///dev/null?key=param&bool#hash" method="fileURLToPath": 3,167,181.914377771

main:

node % ./node benchmark/run.js --filter whatwg-url-to-and-from-path url
url/whatwg-url-to-and-from-path.js n=5000000 input="file:///dev/null" method="fileURLToPath": 2,034,421.4266934511
url/whatwg-url-to-and-from-path.js n=5000000 input="file:///dev/null?key=param&bool" method="fileURLToPath": 2,062,544.6025270298
url/whatwg-url-to-and-from-path.js n=5000000 input="file:///dev/null?key=param&bool#hash" method="fileURLToPath": 2,022,311.8969784945

The majority of file paths won't need decoding, so this PR avoids calling decodeURIComponent when the path is pure ASCII with no encodings

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/url

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. whatwg-url Issues and PRs related to the WHATWG URL implementation. labels Nov 16, 2025
@gurgunday gurgunday added the performance Issues and PRs related to the performance of Node.js. label Nov 16, 2025
@codecov
Copy link

codecov bot commented Nov 16, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.55%. Comparing base (2856475) to head (d756a3c).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/url.js 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #60749      +/-   ##
==========================================
+ Coverage   88.54%   88.55%   +0.01%     
==========================================
  Files         703      703              
  Lines      208222   208256      +34     
  Branches    40140    40152      +12     
==========================================
+ Hits       184360   184420      +60     
+ Misses      15882    15836      -46     
- Partials     7980     8000      +20     
Files with missing lines Coverage Δ
lib/internal/url.js 93.59% <50.00%> (+0.24%) ⬆️

... and 41 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gurgunday
Copy link
Member Author

Can we run the benchmark and the CI if this looks good? I can't do it unfortunately..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. performance Issues and PRs related to the performance of Node.js. whatwg-url Issues and PRs related to the WHATWG URL implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants